home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / howtoo1r / logging.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-08-27  |  5.9 KB  |  177 lines

  1. VERSION 5.00
  2. Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
  3. Begin VB.Form settings_window 
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Server Settings"
  6.    ClientHeight    =   4065
  7.    ClientLeft      =   45
  8.    ClientTop       =   330
  9.    ClientWidth     =   5670
  10.    Icon            =   "logging.frx":0000
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    ScaleHeight     =   4065
  14.    ScaleWidth      =   5670
  15.    StartUpPosition =   3  'Windows Default
  16.    Begin VB.CommandButton default_settings 
  17.       Caption         =   "Default"
  18.       Height          =   375
  19.       Left            =   120
  20.       TabIndex        =   7
  21.       Top             =   3600
  22.       Width           =   1335
  23.    End
  24.    Begin VB.CommandButton apply_settings 
  25.       Caption         =   "Apply"
  26.       Height          =   375
  27.       Left            =   4200
  28.       TabIndex        =   6
  29.       Top             =   3600
  30.       Width           =   1335
  31.    End
  32.    Begin TabDlg.SSTab SSTab1 
  33.       Height          =   3375
  34.       Left            =   120
  35.       TabIndex        =   0
  36.       Top             =   120
  37.       Width           =   5415
  38.       _ExtentX        =   9551
  39.       _ExtentY        =   5953
  40.       _Version        =   327681
  41.       TabHeight       =   520
  42.       TabCaption(0)   =   "General"
  43.       TabPicture(0)   =   "logging.frx":030A
  44.       Tab(0).ControlEnabled=   -1  'True
  45.       Tab(0).Control(0)=   "Frame2"
  46.       Tab(0).Control(0).Enabled=   0   'False
  47.       Tab(0).ControlCount=   1
  48.       TabCaption(1)   =   "NA"
  49.       TabPicture(1)   =   "logging.frx":0326
  50.       Tab(1).ControlEnabled=   0   'False
  51.       Tab(1).Control(0)=   "Frame1"
  52.       Tab(1).ControlCount=   1
  53.       TabCaption(2)   =   "NA"
  54.       TabPicture(2)   =   "logging.frx":0342
  55.       Tab(2).ControlEnabled=   0   'False
  56.       Tab(2).Control(0)=   "Frame3"
  57.       Tab(2).ControlCount=   1
  58.       Begin VB.Frame Frame3 
  59.          Height          =   2775
  60.          Left            =   -74880
  61.          TabIndex        =   5
  62.          Top             =   480
  63.          Width           =   5175
  64.       End
  65.       Begin VB.Frame Frame1 
  66.          Height          =   2775
  67.          Left            =   -74880
  68.          TabIndex        =   4
  69.          Top             =   480
  70.          Width           =   5175
  71.       End
  72.       Begin VB.Frame Frame2 
  73.          Height          =   2775
  74.          Left            =   120
  75.          TabIndex        =   1
  76.          Top             =   480
  77.          Width           =   5175
  78.          Begin VB.TextBox info_port 
  79.             Alignment       =   2  'Center
  80.             Height          =   285
  81.             Left            =   240
  82.             TabIndex        =   8
  83.             Text            =   "TBA"
  84.             Top             =   1320
  85.             Width           =   1575
  86.          End
  87.          Begin VB.TextBox info_max 
  88.             Alignment       =   2  'Center
  89.             Height          =   285
  90.             Left            =   240
  91.             TabIndex        =   2
  92.             Text            =   "TBA"
  93.             Top             =   600
  94.             Width           =   1575
  95.          End
  96.          Begin VB.Label Label2 
  97.             AutoSize        =   -1  'True
  98.             Caption         =   "Server Port : "
  99.             BeginProperty Font 
  100.                Name            =   "MS Sans Serif"
  101.                Size            =   8.25
  102.                Charset         =   0
  103.                Weight          =   700
  104.                Underline       =   0   'False
  105.                Italic          =   0   'False
  106.                Strikethrough   =   0   'False
  107.             EndProperty
  108.             Height          =   195
  109.             Left            =   240
  110.             TabIndex        =   9
  111.             Top             =   1080
  112.             Width           =   1155
  113.          End
  114.          Begin VB.Label Label1 
  115.             AutoSize        =   -1  'True
  116.             Caption         =   "Maximum Clients : "
  117.             BeginProperty Font 
  118.                Name            =   "MS Sans Serif"
  119.                Size            =   8.25
  120.                Charset         =   0
  121.                Weight          =   700
  122.                Underline       =   0   'False
  123.                Italic          =   0   'False
  124.                Strikethrough   =   0   'False
  125.             EndProperty
  126.             Height          =   195
  127.             Left            =   240
  128.             TabIndex        =   3
  129.             Top             =   360
  130.             Width           =   1590
  131.          End
  132.       End
  133.    End
  134. Attribute VB_Name = "settings_window"
  135. Attribute VB_GlobalNameSpace = False
  136. Attribute VB_Creatable = False
  137. Attribute VB_PredeclaredId = True
  138. Attribute VB_Exposed = False
  139. Private Sub apply_settings_Click()
  140. 'change the settings
  141. 'change the max number of clients
  142. If info_max <> "" Then
  143. Let max_clients = info_max
  144. If live_connections > max_clients Then MsgBox "Their are currently more users connect than the limit.", vbOKOnly, "Settings Notice"
  145. End If
  146. 'change the server port
  147. If info_port <> server_port And info_port <> "" Then change_server_port info_port
  148. Unload Me
  149. End Sub
  150. Private Sub default_settings_Click()
  151. info_max = default_max_clients
  152. info_port = default_server_port
  153. End Sub
  154. Private Sub Form_Load()
  155. 'show the current settings
  156. info_max = max_clients
  157. info_port = server_port
  158. End Sub
  159. Private Sub info_max_Change()
  160. 'change max number of users
  161. If info_max = "" Then Exit Sub
  162. On Error GoTo ec
  163. If info_max < 0 Then Let info_max = 0
  164. If info_max > server_max_clients Then info_max = server_max_clients
  165. Exit Sub
  166. info_max.Text = max_clients
  167. End Sub
  168. Private Sub info_port_Change()
  169. 'change max number of users
  170. If info_port = "" Then Exit Sub
  171. On Error GoTo ec
  172. If info_port < 1 Then Let info_port = 1
  173. If info_port > 65535 Then info_port = 65535
  174. Exit Sub
  175. info_port = server_port
  176. End Sub
  177.